

<div id="root">

    <mytable :column="column" :data="data"></mytable>

</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./table.js"></script>
<script>
const vm = new Vue({
    el: "#root",
    data: {
        //用户表格---列数据
        column: [
        { title: "编号", key: "id" },
        { title: "姓名", key: "name" },
        { title: "年龄", key: "age" },
      ],
      data: [
        { id: 1, name: "冰墩墩", age: 3, },
        { id: 2, name: "雪容融", age: 2, },
        { id: 3, name: "喜洋洋", age: 5, },
        { id: 3, name: "灰太狼", age: 7, },
      ],
    },
    })   

</script>